<template>
	<view class="root-wrap">
		<rich-text :nodes="type=='privacy'?content.privacyContent:content.secrecyContent"></rich-text>
	</view>
</template>

<script>
	import { getMiscInfo } from '@/api/user.js';
	export default {
		data() {
			return {
				type:'',
				content:''
			};
		},
		onLoad(params) {
			const { type } = params;
			this.type = type;
			uni.setNavigationBarTitle({
				title: type=='privacy'?'隐私协议':'保密协议'
			})
			getMiscInfo().then((res)=>{
				this.content = res.data;
			})
		}
	}
</script>

<style lang="scss">
	.root-wrap{
		box-sizing: border-box;
		padding: 0 24rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #606266;
		text-align: left;
		line-height: 38rpx;
	}
</style>
